<template>
  <div class="app-container">
      <el-form ref="form" :model="form" :rules="rules" label-width="0">
        <el-form-item label="" prop="">
          <editor v-model="form.content" :min-height="500"/>
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submitForm">确 定</el-button>
      </div>
  </div>
</template>

<script>
import { updateMNotice } from "@/api/system/mNotice";

export default {
  name: "privacyPolicy",
  data() {
    return {
      // 表单参数
      form: {},
      // 表单校验
      rules: {
        content: [
          { required: true, message: "内容不能为空", trigger: "blur" }
        ],
      }
    };
  },
  created() {
  },
  methods: {
    // 表单重置
    reset() {
      this.form = {
        content: null,
      };
      this.resetForm("form");
    },
    /** 提交按钮 */
    submitForm() {
      console.log(this.form.content)
      this.$refs["form"].validate(valid => {
        if (valid) {
          // updateMNotice(this.form).then(response => {
          //   this.$modal.msgSuccess("修改成功");
          // });
        }
      });
    },
  }
};
</script>
